package com.kitty.game.rank.model.record;

import lombok.Getter;
import lombok.Setter;

/**通天塔镜像排行榜记录*/
@Setter
@Getter
public class TowerMirrorRankRecord extends RankRecord {
    private int npcId;
    private String gid;
    private String name;
    private int icon;
    private int maxLayer;
    private short weaponIcon;
    private int suitIcon;
    private int suitLightEffect;

    public TowerMirrorRankRecord() {}

    public TowerMirrorRankRecord(int npcId, String gid, String name, int icon, int maxLayer, short weaponIcon, int suitIcon, int suitLightEffect) {
        this.npcId = npcId;
        this.gid = gid;
        this.name = name;
        this.icon = icon;
        this.maxLayer = maxLayer;
        this.weaponIcon = weaponIcon;
        this.suitIcon = suitIcon;
        this.suitLightEffect = suitLightEffect;
    }

    @Override
    public int compareTo(RankRecord o) {
        /**按层数从大到小排序*/
        TowerMirrorRankRecord other = (TowerMirrorRankRecord)o;
        if (maxLayer != other.getMaxLayer()) {
            return maxLayer > other.getMaxLayer() ? -1 : 1;
        }

        /**层数一样时，就按gid排序吧，保证不是同一个玩家就好了*/
        return gid.compareTo(other.getGid());
    }
}
